﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="OpenAPI.Model" namespace="OpenAPI.Model.OAuth">

	<class  name="OpenAPI.Model.OAuth.ConsumerLevelInfo, OpenAPI.Model" table="T_OAUTH_CONSUMER_LEVEL">

		<id name="CONSUMER_LEVEL" column="CONSUMER_LEVEL" type="String" length="10">
			<generator class="assigned" />
		</id>
		<property name="CONSUMER_LEVEL_NAME" column="CONSUMER_LEVEL_NAME" type="String" length="100" not-null ="true"/>
		<property name="CONSUMER_LEVEL_DESC" column="CONSUMER_LEVEL_DESC" type="String" length="1000" />

		<bag name="MethodsInConsumerLvl" inverse="true" lazy="true" cascade="all-delete-orphan">
			<key column="CONSUMER_LEVEL"/>
			<one-to-many class="OpenAPI.Model.OAuth.MethodInConsumerLevelInfo, OpenAPI.Model"/>
		</bag>
		
	</class>

</hibernate-mapping>
